package com.itcam.phaseii.interface_;

public class InterfaceExercise {
    public static void main(String[] args) {
        new C().pX();
    }
}

interface A {
    int x = 0;
} //想到等价public static final int x = 0;

class B {
    int x = 1;
} //普通属性

class C extends B implements A {
    public void pX() {
//        System.out.println(x); //错误，原因不明确x
        //访问接口的x 就使用A.x
        //访问父类的x 就使用super.x
        System.out.println(A.x + " " + super.x);
    }
}